#include "segment.h"

segment::segment() : a_(), b_() {}

segment::segment(point const &a, point const &b) : a_(a), b_(b) {}

segment::segment(segment const &a)
{
	a_ = a.a_;
	b_ = a.b_;
}

segment::segment(double x1, double y1, double x2, double y2) : a_(x1, y1), b_(x2, y2) {}

std::ostream & operator << (std::ostream & out, segment const & s)
{
        out << s.a_ << "-" << s.b_;
        return out;
}

std::istream & operator >> (std::istream & in, segment & s)
{
        in >> s.a_ >> s.b_;
        return in;
}
